package com.lxw.nonghe.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * 区域统计信息类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegionStat {
    private String regionCode;
    private String regionName;
    private BigDecimal totalAmount;
    private int count;

    public RegionStat addAmount(BigDecimal amount) {
        this.totalAmount = this.totalAmount.add(amount);
        return this;
    }

    public RegionStat incrementCount() {
        this.count++;
        return this;
    }
}
